<?php

class System_Config
{
    private $_data = array();

    public function __construct($data = array())
    {
        $this->add($data);
    }

    public function add($config)
    {
        $this->_data = array_merge($this->_data, $config);
    }

    public function get($name, $default = null)
    {
        return isset($this->_data[$name]) ? $this->_data[$name] : $default;
    }

    public function set($key, $value)
    {
        $this->_data[$key] = $value;
    }

}
